import { ApiProperty } from '@nestjs/swagger';
import { IsEnum, IsNotEmpty, IsOptional, IsString } from 'class-validator';
import { DeviceStatus } from '../../common/enums';

export class UpdateDeviceStatusDto {
  @ApiProperty({
    description: 'Target device status',
    enum: DeviceStatus,
    example: DeviceStatus.LOST,
  })
  @IsEnum(DeviceStatus)
  @IsNotEmpty()
  status: DeviceStatus;

  @ApiProperty({
    description: 'Remark for status change (required for lost or retired status)',
    example: 'Device reported lost by user',
    required: false,
  })
  @IsString()
  @IsOptional()
  remark?: string;
}
